<template>
	<view class="toExamine" v-if="lent.num">
		<view class="toExamineJindu">
			<view class="toExamineJinduImg">
				<image src="https://www.kmdj2018.com/Uploads/zfb/shenhezhong.png" mode="aspectFill"></image>
				<view class="">退款中</view>
			</view>
			<view class="toExamineJinduT">
				<!-- 退款进度 -->
				<NestingSteps title="步骤条" :optionItem="list" :active="active"></NestingSteps>
			</view>
		</view>
		<view class="applyForRefund-top">
			<view class="DetailsShopTop">
				<view class="DetailsShopTopLeft">
					<image :src="lent.goods.img" mode="aspectFit"></image>
				</view>
				<view class="DetailsShopTopRight">
					<view>{{lent.goods.name}}</view>
					<view>序列号：{{lent.goods.goods_num}}</view>
					<view>x{{lent.num}}</view>
				</view>
			</view>
		</view>
		<view class="consult-shop">
			<view class="consult-shop-for">
				<view>退款方式</view>
				<text>原路返回</text>
			</view>
			<view class="consult-shop-for">
				<view>申请退款金额合计</view>
				<text>￥{{lent.tui_price}}</text>
			</view>
			<view class="consult-shop-for">
				<view>退款原因</view>
				<text>{{lent.tui_content }}</text>
			</view>
			<view class="consult-shop-for">
				<view>退款描述</view>
				<text>{{lent.tui_desc}}</text>
			</view>
		</view>
		<view class="DetailsFei" v-if="lent.statustwo != 2">
			<view class="DetailsFeiTiele">
				申请退款金额明细
			</view>
			<view class="DetailsFeiFlex">
				<view>
					租赁费
				</view>
				<view>
					￥{{lent.price}}
				</view>
			</view>
			<view class="DetailsFeiFlex">
				<view>
					押金
				</view>
				<view>
					￥{{lent.deposit}}
				</view>
			</view>
			<view class="DetailsFeiFlex colorRed">
				<view>
					退款合计
				</view>
				<view>
					￥{{parseFloat(lent.tui_price)+parseFloat(lent.deposit)}}
				</view>
			</view>
		</view>
		<view class="DetailsFei" v-if="lent.statustwo == 2">
			<view class="DetailsFeiFlex colorRed">
				<view>
					退款合计
				</view>
				<view>
					￥{{parseFloat(lent.tui_price)}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import NestingSteps from '@/components/nesting-steps/nesting-steps-item.vue'
	export default {
		data() {
			return {
				title: '审核中',
				list: [{
						stepName: '发起退款',
						time: '2020.05.03  19:20:45'
					},
					{
						stepName: '等待商家处理',
						time: '2018-11-12',
					},
				],
				active:2,
				lent:{
					statustwo:''
				},
			};
		},
		onLoad(e) {
			if (e.data) {
				this.init(e.data)
			}else{
				this.init(1)
			}
		},
		methods: {
			init(data) {
				this.$request("Order/FindOrder", {
					data: {
						id: data
					},
					isLoad: false
				}).then(res => {
					this.lent = res.result
					this.list[0].time = this.timeShijianall(res.result.tui_time*1000)
				})
			}
		},
		components: {
			NestingSteps
		}
	}
</script>

<style lang="scss" scoped>
	.toExamine {}

	.applyForRefund-top {
		background-color: #fff;
		padding: 32rpx;
	}

	.DetailsShopTop {

		display: flex;
		align-items: center;

		.DetailsShopTopLeft {
			image {
				width: 160rpx;
				height: 160rpx;
				border-radius: 16rpx;
			}
		}

		.DetailsShopTopRight {
			margin-left: 32rpx;

			>view:nth-child(1) {
				font-size: 32rpx;
				font-weight: bold;
				color: #323233;
				margin-bottom: 24rpx;
			}

			>view:nth-child(2) {
				font-size: 24rpx;
				color: #323233;
				margin-bottom: 24rpx;
			}

			>view:nth-child(3) {
				font-size: 24rpx;
				color: #323233;
			}
		}
	}

	.DetailsFei {
		background-color: #fff;
		margin-top: 20rpx;
		padding: 32rpx;

		.DetailsFeiTiele {
			font-size: 28rpx;
			font-weight: bold;
		}

		.DetailsFeiFlex {
			margin-top: 34rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;

			>view {
				font-size: 28rpx;
			}

			>view:last-child {
				font-weight: bold;
			}
		}
	}

	.consult-shop {
		margin-top: 20rpx;
		padding: 0 32rpx;
		background-color: #fff;

		.consult-shop-for {
			padding: 16rpx 0;
			display: flex;

			>view {
				font-size: 28rpx;
				color: #999999;
			}

			>text {
				margin-left: 20rpx;
				font-size: 28rpx;
				color: #333333;
				font-weight: bold;
			}
		}
	}

	.toExamineJindu {
		margin-bottom: 20rpx;
		background-color: #fff;

		.toExamineJinduImg {
			text-align: center;
			padding: 44rpx 0 40rpx 0;

			image {
				width: 160rpx;
				height: 160rpx;
			}

			view {
				font-size: 28rpx;
				color: #333;
				margin-top: 26rpx;
			}
		}
		.toExamineJinduT{
			padding: 0 30rpx 0 50rpx;
		}
	}
</style>
